import { myEnv } from '@/myEnv';
import { mergeRequest } from '@/utils';
type fromType = {
    phoneNumber: string;
    realName: string;
    qqAccount: string;
    weiboNickName: string;
    weiboFollowerQuantity: string;
    xiaohongshuNickName: string;
    xiaohongshuFollowerQuantity: string;
    tiebaNickName: string;
    tiebaFollowerQuantity: string;
    agencyName: string;
    agentName: string;
    agentPosition: string;
    agentPhoneNumber: string;
};

/** 艺术家入驻 */
export const apiGetArtistsSettledIn = async (form: fromType) => {
    const response: MyResponse<any> = await sendRequest(form);
    return response;
};

const sendRequest = async (form: fromType) => {
    let response: MyResponse<any>;
    if (myEnv.IS_ON_LINE) {
        response = await mergeRequest({
            url: `artist/register`,
            method: 'POST',
            data: {
                ...form,
            },
        });
    } else {
        response = {
            code: '200',
            message: 'ok',
        };
    }
    return response;
};
